<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>4元素显示模式转换</title>
  <style>
    a {
      width: 150px;
      height: 50px;
      background: pink;
      /* 行内元素转换为块级元素 */
      display: block;
    }

    div {
      width: 300px;
      height: 100px;
      background: purple;
        /* 块级元素转换为行内元素 */
      display: inline;
    }

    span {
      width: 300px;
      height: 30px;
      background: skyblue;
      /* 行内元素转换为行内块元素 */
      display: inline-block;
    }
  </style>
</head>

<body>

  <a href="#">金星阿姨</a>
  <a href="#">金星阿姨</a>
  <div>我是块级元素</div>
  <div>我是块级元素</div>
  <span>行内元素转换为行内块元素</span>
  <span>行内元素转换为行内块元素</span>
</body>

</html>